#ifndef TYPE_EXCEPTION_HPP
#define TYPE_EXCEPTION_HPP

#include <string>
#include <utils/utils/string_util.h>

namespace reflex
{
class TypeTraitsException: public std::exception
{
public:
    explicit TypeTraitsException(const std::string &desc)
        : desc(desc)
    {
    }

    ~TypeTraitsException() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT override = default;
    const char *what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT override
    {
        return desc.c_str();
    }

private:
    std::string desc;
};

}

#endif //TYPE_EXCEPTION_HPP
